package cn.net.cfss.fgbp.api.console.constant;

import java.util.HashMap;
import java.util.Map;

import cn.net.cfss.fgbp.base.constant.BaseEnum;

public enum DeleteFlagEnum implements BaseEnum<DeleteFlagEnum, Integer> {

    NOT_DEL(0, "未删除"), DEL(1, "已删除"),;

    private Integer value;
    private String displayName;

    DeleteFlagEnum(Integer value, String displayName) {
        this.value = value;
        this.displayName = displayName;
    }

    @Override
    public Integer getValue() {
        return value;
    }

    @Override
    public String getDisplayName() {
        return displayName;
    }

    private static Map<Integer, DeleteFlagEnum> enumMap = new HashMap<Integer, DeleteFlagEnum>();

    static {
        for (DeleteFlagEnum en : DeleteFlagEnum.values()) {
            enumMap.put(en.getValue(), en);
        }
    }

    public static DeleteFlagEnum getEnum(Integer value) {
        return enumMap.get(value);
    }
}
